package com.fudan.cfg.trans;

import java.util.Map;

import com.fudan.cfg.base.TransDef;
import com.fudan.run.ctx.annotation.TransAdapter;
@TransAdapter("flat_rpc")
public class FlatRpcTransDef extends TransDef{
	public FlatRpcTransDef(String name, String type,String target) {
		super(name, type,target);
	}
	private String ip;
	private Integer port;
	private String method;
	private String target;
	@Override
	public TransDef build(Map<String, Object> configuration) {
		this.target = (String) configuration.get("target");
		this.ip = (String) configuration.get("ip");
		this.port = (Integer) configuration.get("port");
		this.method = (String) configuration.get("method");
		return this;
	}
	public String getIp() {
		return ip;
	}
	public void setIp(String ip) {
		this.ip = ip;
	}
	public Integer getPort() {
		return port;
	}
	public void setPort(Integer port) {
		this.port = port;
	}
	public String getMethod() {
		return method;
	}
	public void setMethod(String method) {
		this.method = method;
	}
	public String getTarget() {
		return target;
	}
	public void setTarget(String target) {
		this.target = target;
	}

}
